package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the COST_ARTICLE database table.
 * 
 */
@Embeddable
public class CostArticlePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="ARTICLE_CODE", unique=true, nullable=false, length=30)
	private String articleCode;

    public CostArticlePK() {
    }
        
	public String getArticleCode() {
		return this.articleCode;
	}
	public void setArticleCode(String articleCode) {
		this.articleCode = articleCode;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CostArticlePK)) {
			return false;
		}
		CostArticlePK castOther = (CostArticlePK)other;
		return 
			this.articleCode.equals(castOther.articleCode);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;		
		hash = hash * prime + this.articleCode.hashCode();
		
		return hash;
    }
}